#include <iostream>
#include <algorithm>

using namespace std;
#define int long long
int n;
int cnt;
const int N = 1e6 + 10;
int p[N];
bool st[N];

void get_prime()
{
    for(int i = 2;i <= n;i ++)
    {
        if(!st[i]) p[++ cnt] = i;
        for(int j = 1;i * p[j] <= n;j ++)
        {
            st[p[j] * i] = true;
            if(p[j] % i == 0) break;
        }
    }
}
signed main()
{
    cin >> n;
    get_prime();
    cout << cnt << endl;
    return 0;
}